package com.free.bsf.file.config;

import com.free.bsf.file.impl.AliOssFileProvider;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

/**
 * @author Huang Zhaoping
 */
@Data
@ConfigurationProperties(prefix = "bsf.file")
public class FileProperties {
    public static final String PROVIDER_QINIU = "qiniu";
    public static final String PROVIDER_ALIOSS = "alioss";

    public static String Project="File";
    public static String Prefix="bsf.file.";

    public static String RetryUpload= "bsf.file.retryUpload";

    private String provider;

    private boolean warningEnabled;

    @Value("{$bsf.env:}")
    private String bsfEnv;


    @NestedConfigurationProperty
    private QiniuProperties qiniu;
    //引用其他位置的配置文件加载至对象
    @NestedConfigurationProperty
    private AliOssProperties alioss;
}
